TAG=main.t

#CC = icc -std=c++11
CC = icpc -std=c++11 -qopenmp
#CC = g++ -std=c++11 #-fopenmp -lpthread
#CC= mpic++ -std=c++11 -qopenmp -mavx
lib_path= -L$(HOME)/usr/lib
INC= -I$(HOME)/usr/include

GSL_LIBS= -lgsl -lgslcblas
Boost_LIBS= -lboost_serialization -lboost_system -lboost_filesystem

DIR_OBJ = ./obj


#OBJ=$(OBJ_Sep)$(OBJ_Com)
# main.o const_nucl.o coupling_coeff.o basis_state.o antisym_coeff.o trans_coeff.o \
# wavefun_coeff.o cont_term.o ope_term.o tpe_term.o package.o checkVsTok.o \
# checkTwoPi.o normal_order.o com_sparse_row.o multi_pack.o read_data.o  \
# checkVsSat.o get_input_file.o
OBJ= \
./obj/main.o \
./obj/const_nucl.o \
./obj/coupling_coeff.o \
./obj/basis_state.o \
./obj/normal_order.o \
./obj/com_sparse_row.o \
./obj/multi_pack.o \
./obj/read_data.o  \
./obj/mbpt.o \
./obj/operator.o \
./obj/get_input_file.o \





#checkVsTok.o checkTwoPi.o
#cg_coeff.o  rbhf_solver.o

#OBJ = main.o coupling_coeff.o basis_state.o antisym_coeff.o wavefun_coeff.o tpe_term.o

CFLAGS = -O3 -Wl,--rpath=$(HOME)/usr/lib
#CFLAGS= -O3 -Wl,--rpath=/Users/zhuo/usr/lib
#CFLAGS= -O3 -Wl,--rpath=/opt/usr/lib
#VPATH=../DF_src/DF_Mpi_Sep ../DF_src/DF_Common

vpath %.cpp ../SRC/DF_MB  ../SRC/DF_Common
vpath %.h ../SRC/DF_MB ../SRC/DF_Common
vpath %.o ./obj

$(TAG):$(OBJ)
	$(CC) $(CFLAGS) -o $(TAG) $(OBJ) $(LIB) $(GSL_LIBS) $(Boost_LIBS)

$(DIR_OBJ)/%.o:%.cpp
	$(CC) $(INC) -c $< -o $@



.PHONY : clean
clean:
	rm main.t $(OBJ) $(DIR_OBJ)/*
	#rm *.o main.t *~ *.gch  *.dat ./serial_dat/*.dat #./data/*.dat
